package com.qqaq.controller;

import com.qqaq.entities.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class MainController {

//    public static final String url = "http://localhost:8001";
    public static final String url = "http://CLOUD-PAYMENT-SERVICE";


    @Autowired
    RestTemplate restTemplate;


    @GetMapping("/")
    public CommonResponse index(){
        return restTemplate.getForObject(url+"/", CommonResponse.class);
    }

}
